package com.bjsxt.domain;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 权限配置
 */
@ApiModel(value = "com-bjsxt-domain-SysPrivilege")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "sys_privilege")
public class SysPrivilege {
    public static final String COL_ID = "id";
    public static final String COL_MENU_ID = "menu_id";
    public static final String COL_NAME = "name";
    public static final String COL_DESCRIPTION = "description";
    public static final String COL_URL = "url";
    public static final String COL_METHOD = "method";
    public static final String COL_CREATE_BY = "create_by";
    public static final String COL_MODIFY_BY = "modify_by";
    public static final String COL_CREATED = "created";
    public static final String COL_LAST_UPDATE_TIME = "last_update_time";
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键")
    private Long id;
    /**
     * 所属菜单Id
     */
    @TableField(value = "menu_id")
    @ApiModelProperty(value = "所属菜单Id")
    @NotNull
    private Long menuId;
    /**
     * 功能点名称
     */
    @TableField(value = "name")
    @ApiModelProperty(value = "功能点名称")
    @NotBlank
    private String name;
    /**
     * 功能描述
     */
    @TableField(value = "description")
    @ApiModelProperty(value = "功能描述")
    private String description;
    @TableField(value = "url")
    @ApiModelProperty(value = "")
    private String url;
    @TableField(value = "method")
    @ApiModelProperty(value = "")
    private String method;
    /**
     * 创建人
     */
    @TableField(value = "create_by", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建人")
    private Long createBy;
    /**
     * 修改人
     */
    @TableField(value = "modify_by", fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "修改人")
    private Long modifyBy;
    /**
     * 创建时间
     */
    @TableField(value = "created", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private Date created;
    /**
     * 修改时间
     */
    @TableField(value = "last_update_time", fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "修改时间")
    private Date lastUpdateTime;
}